package server;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class Server {

private	ServerSocket ss = null;
	private Socket s;

	public Server(int port) {
		try {
			ss = new ServerSocket(port);
		} catch (IOException e) {
			e.printStackTrace();
		}

	}
	public void start() {
		
		try {
			while(true){
				s = ss.accept();
				ServerThread sThread = new ServerThread(s);
				sThread.start();
			}
			
			
			
		} catch (IOException e) {

			e.printStackTrace();
		}
		
		

		
	}
	
	

}
